package com.enjoybyte.pangucloud.consumer.controller;

import com.enjoybyte.pangucloud.api.client.DemoClient;
import com.enjoybyte.pangucloud.api.dto.UserDemoDto;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequiredArgsConstructor
public class TestController {

    private final DemoClient demoClient;

    @GetMapping("test/{id}")
    public UserDemoDto getUserDemo(@PathVariable Long id){
        return demoClient.getUserDemoByIds(id);
    }
}
